Skip to content

Add node-test-example; run examples via a CI matrix - #16

Merged
olecve merged 1 commit into
mainfrom
examples/node-test
Jul 16, 2026
Merged

Add node-test-example; run examples via a CI matrix#16
olecve merged 1 commit into
mainfrom
examples/node-test

Conversation

@olecve

@olecve olecve commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Adds a second example and generalizes the example CI.

examples/node-test-example — a minimal shadow-cljs :node-test + jsdom project (no browser) that runs fully end-to-end in CI. It shows the setup (deps, node-test build, global-jsdom preload) plus representative usage:

  • app.reagent-test — Reagent: render!, fire-event (wrapped in act), screen, within, and mocks.
  • app.plain-react-test — plain React: raw createElement, user-event, and async find-by-* as native ^:async / await tests.

CI matrix — the example job now runs over [reagent-karma-example, node-test-example], each invoked via a standard npm run ci script (the karma example gains one). Adding future examples is just a matrix entry + a ci script.

Note: the clj-kondo release on npm doesn't recognize native await yet (the root repo's clj-kondo, from the release action, does), so this example excludes await from the unresolved-symbol linter.

Verified locally: both examples' npm run ci pass (node-test-example: 5 tests / 7 assertions; reagent-karma-example: 3 / 7).

New examples/node-test-example: a minimal shadow-cljs :node-test + jsdom
project (no browser) that runs fully in CI. It demonstrates the setup
(deps, node-test build, global-jsdom preload) plus:
- app.reagent-test: render!, fire-event (in act), screen, within, mocks
- app.plain-react-test: raw createElement, user-event, and async find-by
  written as native ^:async / await tests

Generalize the CI example job into a matrix over the example projects,
each invoked via a standard npm run ci script (reagent-karma-example
gains one). clj-kondo on npm does not know native await yet, so the new
example excludes it from the unresolved-symbol linter.
@olecve
olecve merged commit 270e7c1 into main Jul 16, 2026
3 checks passed
@olecve
olecve deleted the examples/node-test branch July 16, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant